package o;

import java.io.Closeable;
import javax.annotation.Nullable;
import o.fui.a;

public final class fvb implements Closeable {
    final fui ʻ;
    @Nullable
    final fvb ʼ;
    @Nullable
    final fuy ʽ;
    final String ˊ;
    final long ˊॱ;
    @Nullable
    final fuk ˋ;
    final fut ˎ;
    final int ˏ;
    @Nullable
    private volatile fuc ͺ;
    final fus ॱ;
    final long ॱˊ;
    @Nullable
    final fvb ॱॱ;
    @Nullable
    final fvb ᐝ;

    public static class d {
        @Nullable
        fvb ʻ;
        @Nullable
        fuy ʼ;
        a ʽ;
        @Nullable
        fus ˊ;
        @Nullable
        fuk ˋ;
        long ˋॱ;
        @Nullable
        fut ˎ;
        String ˏ;
        int ॱ;
        long ॱˊ;
        @Nullable
        fvb ॱॱ;
        @Nullable
        fvb ᐝ;

        public d() {
            this.ॱ = -1;
            this.ʽ = new a();
        }

        d(fvb o_fvb) {
            this.ॱ = -1;
            this.ˊ = o_fvb.ॱ;
            this.ˎ = o_fvb.ˎ;
            this.ॱ = o_fvb.ˏ;
            this.ˏ = o_fvb.ˊ;
            this.ˋ = o_fvb.ˋ;
            this.ʽ = o_fvb.ʻ.ˎ();
            this.ʼ = o_fvb.ʽ;
            this.ᐝ = o_fvb.ᐝ;
            this.ॱॱ = o_fvb.ʼ;
            this.ʻ = o_fvb.ॱॱ;
            this.ॱˊ = o_fvb.ॱˊ;
            this.ˋॱ = o_fvb.ˊॱ;
        }

        public d ˎ(fus o_fus) {
            this.ˊ = o_fus;
            return this;
        }

        public d ॱ(fut o_fut) {
            this.ˎ = o_fut;
            return this;
        }

        public d ॱ(int i) {
            this.ॱ = i;
            return this;
        }

        public d ˊ(String str) {
            this.ˏ = str;
            return this;
        }

        public d ॱ(@Nullable fuk o_fuk) {
            this.ˋ = o_fuk;
            return this;
        }

        public d ˊ(String str, String str2) {
            this.ʽ.ˎ(str, str2);
            return this;
        }

        public d ˏ(String str, String str2) {
            this.ʽ.ˊ(str, str2);
            return this;
        }

        public d ॱ(fui o_fui) {
            this.ʽ = o_fui.ˎ();
            return this;
        }

        public d ॱ(@Nullable fuy o_fuy) {
            this.ʼ = o_fuy;
            return this;
        }

        public d ˏ(@Nullable fvb o_fvb) {
            if (o_fvb != null) {
                ˏ("networkResponse", o_fvb);
            }
            this.ᐝ = o_fvb;
            return this;
        }

        public d ˋ(@Nullable fvb o_fvb) {
            if (o_fvb != null) {
                ˏ("cacheResponse", o_fvb);
            }
            this.ॱॱ = o_fvb;
            return this;
        }

        private void ˏ(String str, fvb o_fvb) {
            if (o_fvb.ʽ != null) {
                throw new IllegalArgumentException(str + ".body != null");
            } else if (o_fvb.ᐝ != null) {
                throw new IllegalArgumentException(str + ".networkResponse != null");
            } else if (o_fvb.ʼ != null) {
                throw new IllegalArgumentException(str + ".cacheResponse != null");
            } else if (o_fvb.ॱॱ != null) {
                throw new IllegalArgumentException(str + ".priorResponse != null");
            }
        }

        public d ˊ(@Nullable fvb o_fvb) {
            if (o_fvb != null) {
                ॱ(o_fvb);
            }
            this.ʻ = o_fvb;
            return this;
        }

        private void ॱ(fvb o_fvb) {
            if (o_fvb.ʽ != null) {
                throw new IllegalArgumentException("priorResponse.body != null");
            }
        }

        public d ॱ(long j) {
            this.ॱˊ = j;
            return this;
        }

        public d ˏ(long j) {
            this.ˋॱ = j;
            return this;
        }

        public fvb ˏ() {
            if (this.ˊ == null) {
                throw new IllegalStateException("request == null");
            } else if (this.ˎ == null) {
                throw new IllegalStateException("protocol == null");
            } else if (this.ॱ < 0) {
                throw new IllegalStateException("code < 0: " + this.ॱ);
            } else if (this.ˏ != null) {
                return new fvb(this);
            } else {
                throw new IllegalStateException("message == null");
            }
        }
    }

    fvb(d dVar) {
        this.ॱ = dVar.ˊ;
        this.ˎ = dVar.ˎ;
        this.ˏ = dVar.ॱ;
        this.ˊ = dVar.ˏ;
        this.ˋ = dVar.ˋ;
        this.ʻ = dVar.ʽ.ˊ();
        this.ʽ = dVar.ʼ;
        this.ᐝ = dVar.ᐝ;
        this.ʼ = dVar.ॱॱ;
        this.ॱॱ = dVar.ʻ;
        this.ॱˊ = dVar.ॱˊ;
        this.ˊॱ = dVar.ˋॱ;
    }

    public fus ॱ() {
        return this.ॱ;
    }

    public fut ˎ() {
        return this.ˎ;
    }

    public int ˊ() {
        return this.ˏ;
    }

    public boolean ˏ() {
        return this.ˏ >= 200 && this.ˏ < 300;
    }

    public String ˋ() {
        return this.ˊ;
    }

    @Nullable
    public fuk ʻ() {
        return this.ˋ;
    }

    @Nullable
    public String ˋ(String str) {
        return ˏ(str, null);
    }

    @Nullable
    public String ˏ(String str, @Nullable String str2) {
        String ॱ = this.ʻ.ॱ(str);
        return ॱ != null ? ॱ : str2;
    }

    public fui ʼ() {
        return this.ʻ;
    }

    @Nullable
    public fuy ᐝ() {
        return this.ʽ;
    }

    public d ʽ() {
        return new d(this);
    }

    @Nullable
    public fvb ॱॱ() {
        return this.ᐝ;
    }

    @Nullable
    public fvb ˋॱ() {
        return this.ॱॱ;
    }

    public fuc ͺ() {
        fuc o_fuc = this.ͺ;
        if (o_fuc != null) {
            return o_fuc;
        }
        o_fuc = fuc.ˏ(this.ʻ);
        this.ͺ = o_fuc;
        return o_fuc;
    }

    public long ॱˊ() {
        return this.ॱˊ;
    }

    public long ˏॱ() {
        return this.ˊॱ;
    }

    public void close() {
        if (this.ʽ == null) {
            throw new IllegalStateException("response is not eligible for a body and must not be closed");
        }
        this.ʽ.close();
    }

    public String toString() {
        return "Response{protocol=" + this.ˎ + ", code=" + this.ˏ + ", message=" + this.ˊ + ", url=" + this.ॱ.ˏ() + '}';
    }
}
